import request from '@/request'

export function getArticles() {


  return request({
    url:"/article",
    method:'get'
  })

}


export function createArticle(data) {


  return request({

    url:"/article",
    method:'post',
    data
  })

}


export function getArticle(id) {


  return request({
    url:"/article/"+id,
    method:'get',

  })

}

export function editArticle(id,data) {


  return request({

    url:"/article/"+id,
    method:'put',
    data
  })

}


export function deleteArticle(id) {


  return request({

    url:"/article/"+id,
    method:'delete'
  })

}
